﻿using System;
using System.IO;

using Utilities.IO;
using Utilities.Media.Containers.Riff;

namespace Utilities.Media.Containers.Wav
{
    public class DataChunk : RiffChunk
    {
        public DataChunk(DataStream stream)
        {
            ID = stream.ReadString(4);
            Size = stream.ReadInt32();

            if (ID != "data")
                throw new InvalidDataException();
        }
        public DataChunk()
        {
            ID = "data";
            Size = Int32.MaxValue;
        }
    }
}
